<template>
  <stock-all ref="industryList" :plateId="plateId" :sortList="sh_industry" @ListClick="ListClick"></stock-all>
</template>
<script>
import stockAll from "@/components/stock/stock_all.vue";
export default {
  components: { stockAll },
  data() {
    return {
      sh_industry: {
        toggleShow: true,
        order: ["", "DESC", "ASC"],
        name: "order",
        url: "/market.v1/market/plateInfo", //主板 HK
        submit: {
          type: "CN",
          securityType: "1",
          plateId: "", // 板块id
          plateType: "1", // 板块类型 1：行业板块，2:概念板块
          field: "gain",
          order: "DESC",
          pageSize: "20",
          page: 1
        }
      },
      plateId: "", // 用于判断id是否变化
    };
  },
  methods: {
    ListClick(isTrue) {
      this.$store.dispatch("SetShActive", isTrue);
    }
  },
  created() {
    this.sh_industry.submit.plateId = this.$route.params.id;
    this.plateId = this.$route.params.id;
  },
  watch: {
    "$route.params.id"(val) {
        this.sh_industry.submit.plateId = val;
        this.sh_industry.submit.page = 1;
        this.plateId = this.$route.params.id;
    }
  }
};
</script>
<style lang="less" scoped></style>
